<template>
  <div id="app">
    <div class="nav-wrapper">
    <ul class="nav">
      <router-link tag="li" to="/register" class="nav-item">添加用户</router-link>
      <router-link tag="li" to="/userlist" class="nav-item">用户列表</router-link>
    </ul>
  </div>
  <router-view></router-view>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'app',
  methods:{
  async  getData(){
    const data  =  await axios.get("/user")
      console.log(data)
    }
  }
}

</script>

<style lang="less" scoped>
ul{
  list-style: none;
  padding: 0;
  margin: 0;
}
#app{
  width: 400px;
}
.nav-wrapper{
  width: 100%;
  margin-bottom: 20px;
  border-radius: 4px;
  overflow: hidden;
.nav{
  display: flex;
  align-items: center;
  justify-content: center;

  .nav-item{
    width: 50%;
    background-color: lightblue;
    text-align: center;
    padding: 10px 0;
    color: #fff;
  }
}
}
</style>
